.wrapper {
  width: 100%;
  height: 100vmax;
  background-color: #171f27;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column wrap;
  --target-border-color: rgb(92, 102, 112);
  --box-border-color: hsl(210deg 7.09% 50.2%);
  --box-bg-color: hsl(210deg, 15%, 20%);
  --repeat-linear: repeating-linear-gradient(45deg, rgba(184, 204, 224, 0.06) 0px, rgba(184, 204, 224, 0.06) 10px, rgba(184, 204, 224, 0) 10px, rgba(184, 204, 224, 0) 20px);
}

.container {
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  perspective: 1000px;
  perspective-origin: 100% -100%;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
}

.playground {
  width: 300px;
  margin: 50px auto 50px;
  height: 300px;
  transform-style: preserve-3d;
  transition: all 0.5s;

  &.active {
    transform: skewY(18deg);
  }
}

.target {
  width: 300px;
  height: 300px;
  padding: 2px;
  border-radius: 4px;
  color: #fff;
  box-sizing: border-box;
  position: absolute;
  transform-style: preserve-3d;
  border: 1px solid var(--target-border-color);
  transition: all 0.5s;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);

  &.active {
    transform: translateX(-30px) scaleX(0.85) translateZ(30px);
  }
}
#over.target {
  border: 1px solid transparent;
  z-index: 2;
}
#under.target {
  z-index: 1;

  &.active {
    transform: scale(0.85) translateX(30px) translateZ(-30px);
  }
}

.box_out {
  position: relative;
  box-sizing: border-box;
  border: 4px dashed transparent;
  border-radius: 4px;
  transition: all 0.5s;
}

.box_inner {
  box-sizing: border-box;
  background-color: var(--box-bg-color);
  border: 2px solid var(--box-border-color);
  border-radius: 4px;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.width {
  width: 100%;
  position: absolute;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  bottom: -16px;
  transform: translateY(50%);
}
.width_line {
  flex: 1;
  height: 1px;
  background-color: #fff;

  &#line_left {
  margin-left: -16px;
  }
  &#line_right {
    margin-right: -16px;
  }
}
.width_text {
  padding: 0 4px;
  background-color: #171f27;
  font-size: 12px;
}

.height {
  height: 100%;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column wrap;
  right: -16px;
  transform: translateX(50%);
}
.height_line {
  flex: 1;
  width: 1px;
  background-color: #fff;

  &#line_top {
    margin-top: -16px;
  }
  &#line_bottom {
    margin-bottom: -16px;
  }
}
.height_text {
  padding: 0 4px;
  transform: rotate(90deg);
  background-color: #171f27;
  font-size: 12px;
}


// xxxxxx
.column {
  width: 100%;
  height: 100%;
  position: absolute;
  padding: 0 2px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
}
.column_line {
  position: relative;
  border-left: 2px dashed var(--target-border-color);
  margin-top: -16px;
  margin-bottom: -16px;

  &:nth-child(2),
  &:nth-child(3),
  &:nth-child(4) {
    transform: translateX(-1px);
  }
}
.column_num {
  position: absolute;
  transform: translate(-50%, -50%);
  top: -16px;
  left: -3px;
}
.row {
  width: 100%;
  height: 100%;
  padding: 2px 0;
  position: absolute;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
.row_line {
  position: relative;
  border-top: 2px dashed var(--target-border-color);
  margin-left: -16px;
  margin-right: -16px;

  // &:nth-child(2),
  // &:nth-child(3),
  // &:nth-child(4) {
  //   background-color: red;
  //   transform: translateY(-1px);
  // }
}
.row_num {
  position: absolute;
  transform: translate(-50%, -50%);
  left: -16px;
  top: -3px;
}